'use strict';

module.exports = appInfo => {
  const config = exports = {};

  // use for cookie sign key, should change to your own and keep security
  config.keys = appInfo.name + '_1522041509192_387';

  // add your config here
  config.middleware = ['dataformat','auth'];

  config.mysql = {
    client:{
        host:'localhost',
        port:'3306',
        user:'root',
        password:'1',
        database:'kuaidian'
    }
  }

  config.redis = {
    client:{
      port:6379,
      host:'localhost',
      password:'',
      db:1
    }
  }
  config.security = {
    csrf:{
      enable:false
    }
  }
  config.cors = {
    origin:'*',
    allowMethods:'GET,HEAD,PUT,POST,DELETE,PATCH,OPTIONS',
    credentials:true
  }

  config.token_seed = 'access_to_manage';
  config.auth = {
    seed:config.token_seed
  }
  return config;
};
